package com.catering.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName d_orderinformation
 */
@TableName(value ="d_orderinformation")
@Data
public class DOrderinformation implements Serializable {
    /**
     * 订单详情ID
     */
    @TableId(type = IdType.AUTO)
    private Integer oid;

    /**
     * 菜品名称
     */
    private String dishname;

    /**
     * 下单时间
     */
    private Date create_time;

    /**
     * 订单总价
     */
    private Integer price;

    /**
     * 用户名
     */
    private Integer uid;

    /**
     * 支付方式
     */
    private String parmentoption;

    /**
     * 状态（0代表已支付，1代表已退款，2代表未付款）
     */
    private Integer status;

    private String img;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DOrderinformation other = (DOrderinformation) that;
        return (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid()))
            && (this.getDishname() == null ? other.getDishname() == null : this.getDishname().equals(other.getDishname()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getParmentoption() == null ? other.getParmentoption() == null : this.getParmentoption().equals(other.getParmentoption()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode());
        result = prime * result + ((getDishname() == null) ? 0 : getDishname().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getParmentoption() == null) ? 0 : getParmentoption().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", oid=").append(oid);
        sb.append(", dishname=").append(dishname);
        sb.append(", create_time=").append(create_time);
        sb.append(", price=").append(price);
        sb.append(", uid=").append(uid);
        sb.append(", parmentoption=").append(parmentoption);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
